package com.link2room.bumblebee.controller.api;

import com.link2room.bumblebee.dto.param.base.FindWebSettingParamDto;
import com.link2room.bumblebee.facade.IWebSettingApiFacadeService;
import com.link2room.common.dto.result.base.BaseResultDto;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by LN on 2017/12/18
 */
@Api(tags = "获取站点信息")
@RestController
@RequestMapping("/api/WebSettings")
public class WebSettingsApiController {
    @Resource
    private IWebSettingApiFacadeService webSettingApiFacadeService;

    @RequestMapping(method = RequestMethod.GET)
    public BaseResultDto listWebSettings(

            @RequestParam(name = "domain") String domain

    ) throws Exception {
        FindWebSettingParamDto paramDto = new FindWebSettingParamDto();
        paramDto.setDomain(domain);
        BaseResultDto l2rRs = new BaseResultDto();
        l2rRs.setResultCode(0);
        l2rRs.setResultInfo(webSettingApiFacadeService.listWebSettingsDto(paramDto));
        return l2rRs;
    }
}
